Dynomotion

Group: DynoMotion Message: 12253 From: philloder Date: 9/12/2015
Subject: Mach3 I/O with kstep JP33

I have tried to setup Mach3 to enable my spindle and it starts for about 2 seconds and then stops until I reset it and repeat.

I am using relay 0 to run run inverter.

I have the output bits set as output #1 to port 1 bit 0 

It will come on and stay on when using kmotion m3 set bit 0 to 1

for now I am using a fixed speed in the inverter. This will be a pulse train to the inverter when the run command is working correctly. 

All the setup is as shown in the mach3 plug in example.


Group: DynoMotion Message: 12254 From: philloder Date: 9/12/2015
Subject: Re: Mach3 I/O with kstep JP33
Never mind, I selected the wrong spindle.c file
Group: DynoMotion Message: 12255 From: TKSOFT Date: 9/12/2015
Subject: Re: Mach3 I/O with kstep JP33
Hi,

Is anything else configured to use IO bit 0?

Does the I/O bit remain configured as an output as shown on the KMotion Digital I/O Screen?

You will probably want to eventually use and configure a Spindle C Program to turn on/off, control direction, and speed.  So you may want to switch to that.

Otherwise post your Mach3 XML file and we can take a look at it.  What Version of Mach3 and KMotion are you using?

Regards
TK

Group: DynoMotion Message: 12268 From: philloder Date: 9/17/2015
Subject: Re: Mach3 I/O with kstep JP33
Tom,

My setup is as follows.

KFlop board

KStep board

Windows XP pro SP3

Mach 3 --R 3.043.066

KMotion ver 4.32

3 axis Router with "A" slaved to "Y"  open loop normal stepping

All motors are nema 34, 200 steps / rev 

16,598 pulses per inch

I am wanting to control the spindle run /speed in mach 3

Hitachi Inverter WJ200 analog in.

Connections

Stepper J33   >  Inverter

5     >   H      Analog 10 Vdc

6      >  O      Analog Voltage input 

7      >  L      Analog Ground

drive settings 20- 400 hZ

Analog in min   0%

Analog in Max  33.3%      3.3volt Vdc

Analog speed min 20 hZ

Analog speed max 400 hZ

Analog speed reference  is terminal

I checked voltage from 5 to 7 and got 10 Vdc

I checked 6 to 7 with the spindle running and 100% speed selected and got Zero Vdc

I am using the C Code included in ver 4.32 and setting it up in mach3 like the example shows for the Mach3 plugin.

I used the KStep version of the Spindle program "SpindleMach3KStep.c" first and it runs the spindle for just a second then stops. you have to init the KFlop system before it will run again for a second.

I switched to the example code "SpindleMach3DAC.c"and it runs from mach3 but no speed control 

As soon as this is functional I will be installing the limit switches and using the homing C-code. when I tried to compile and load the file "HomeMach3.c" per the example it gave a error of pointer expected at the line that saves the limit settings.

The limits switches will be connected to JP33 of the stepper, Please recommend inputs for the simple home program using KStep and Mach3


Thanks,

Phil


  @@attachment@@
Group: DynoMotion Message: 12271 From: TKSOFT Date: 9/17/2015
Subject: Re: Mach3 I/O with kstep JP33 [2 Attachments]
Hi Phil,

I tested with your Mach3 XML and Mach Version 3.043.066 using SpindleMach3KStep.c and it seems to work correctly.

I used KMotion 4.33q but that is not likely to matter.
In the Mach3 MDI I entered "S10000 M3"

That printed on the KMotion.exe Console Screen:

Spindle CW ON
Mach3 Notify Message=5, Direction= 0, Spindle Set to 0.400000
Spindle Speed Set to 0.400000

I can see I/O bit 44 randomly toggling on and off on the KMotion.exe Digital I/O Screen.  Which would indicate it is PWMing at some significant duty cycle (should be 40%).

Please repeat these steps and check if you get the same results.

My understanding is that the Spindle Runs and then turns off after a few seconds?  If so check the reason it shuts off.  Check if I/O 44 is still an Output and Toggling.  Check the analog voltage.  Check the relay outputs.

HTH
Regards
TK









Group: DynoMotion Message: 12276 From: phil loder Date: 9/18/2015
Subject: Re: Mach3 I/O with kstep JP33
Tom,


I just thought of something and looked at the c code for the SpindleMach3KStep.c 
My spindle is wired to relay 0 for CW running only and there is no CCW.
Relay 1 is reserved for the coolant spray and has not been assigned yet.
I changed the C-Code to only turn on relay 0  for CW or CCW and only turn off relay 0 when stopping.


All is working for the spindle.

thanks,
Phil







On Thursday, September 17, 2015 3:12 PM, "tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi Phil,

I tested with your Mach3 XML and Mach Version 3.043.066 using SpindleMach3KStep.c and it seems to work correctly.

I used KMotion 4.33q but that is not likely to matter.
In the Mach3 MDI I entered "S10000 M3"

That printed on the KMotion.exe Console Screen:

Spindle CW ON
Mach3 Notify Message=5, Direction= 0, Spindle Set to 0.400000
Spindle Speed Set to 0.400000

I can see I/O bit 44 randomly toggling on and off on the KMotion.exe Digital I/O Screen.  Which would indicate it is PWMing at some significant duty cycle (should be 40%).

Please repeat these steps and check if you get the same results.

My understanding is that the Spindle Runs and then turns off after a few seconds?  If so check the reason it shuts off.  Check if I/O 44 is still an Output and Toggling.  Check the analog voltage.  Check the relay outputs.

HTH
Regards
TK